A typical optical module generally includes a number of components such as a housing, an optical assembly, and a circuit board. In general, during assembly of the optical module, after components inside a housing are assembled, upper and lower housing parts are secured together. For example, Chinese Patent Application No. 201310219168.7 discloses an optical module, which includes a base, a housing, a bidirectional transceiving component, and a printed circuit board. The transceiving component includes interface parts. After the entire optical module is assembled, the interface parts are disposed in two corresponding sockets. When the optical module is connected to an optical fiber connector or another connector, the connector is inserted into the sockets to be coupled with the interface parts. The relative positions of the interface parts and the sockets are required to be fixed with a high degree of precision after the optical module is assembled and installed. Otherwise, imprecise alignment, difficulty in inserting and removing the connector, and electromagnetic leakage are likely to occur.